3.9 \(\int \csc ^2(2 a+2 b x) \sin (a+b x) \, dx\)

Optimal. Leaf size=28 \[ \frac{\sec (a+b x)}{4 b}-\frac{\tanh ^{-1}(\cos (a+b x))}{4 b} \]

[Out]

-ArcTanh[Cos[a + b*x]]/(4*b) + Sec[a + b*x]/(4*b)

________________________________________________________________________________________

Rubi [A]  time = 0.0382959, antiderivative size = 28, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {4288, 2622, 321, 207} \[ \frac{\sec (a+b x)}{4 b}-\frac{\tanh ^{-1}(\cos (a+b x))}{4 b} \]

Antiderivative was successfully verified.

[In]

Int[Csc[2*a + 2*b*x]^2*Sin[a + b*x],x]

[Out]

-ArcTanh[Cos[a + b*x]]/(4*b) + Sec[a + b*x]/(4*b)

Rule 4288

Int[((f_.)*sin[(a_.) + (b_.)*(x_)])^(n_.)*sin[(c_.) + (d_.)*(x_)]^(p_.), x_Symbol] :> Dist[2^p/f^p, Int[Cos[a
+ b*x]^p*(f*Sin[a + b*x])^(n + p), x], x] /; FreeQ[{a, b, c, d, f, n}, x] && EqQ[b*c - a*d, 0] && EqQ[d/b, 2]
&& IntegerQ[p]

Rule 2622

Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
 + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \csc ^2(2 a+2 b x) \sin (a+b x) \, dx &=\frac{1}{4} \int \csc (a+b x) \sec ^2(a+b x) \, dx\\ &=\frac{\operatorname{Subst}\left (\int \frac{x^2}{-1+x^2} \, dx,x,\sec (a+b x)\right )}{4 b}\\ &=\frac{\sec (a+b x)}{4 b}+\frac{\operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,\sec (a+b x)\right )}{4 b}\\ &=-\frac{\tanh ^{-1}(\cos (a+b x))}{4 b}+\frac{\sec (a+b x)}{4 b}\\ \end{align*}

Mathematica [A]  time = 0.0385351, size = 50, normalized size = 1.79 \[ \frac{\sec (a+b x)}{4 b}+\frac{\log \left (\sin \left (\frac{1}{2} (a+b x)\right )\right )}{4 b}-\frac{\log \left (\cos \left (\frac{1}{2} (a+b x)\right )\right )}{4 b} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[2*a + 2*b*x]^2*Sin[a + b*x],x]

[Out]

-Log[Cos[(a + b*x)/2]]/(4*b) + Log[Sin[(a + b*x)/2]]/(4*b) + Sec[a + b*x]/(4*b)

________________________________________________________________________________________

Maple [A]  time = 0.032, size = 36, normalized size = 1.3 \begin{align*}{\frac{1}{4\,b\cos \left ( bx+a \right ) }}+{\frac{\ln \left ( \csc \left ( bx+a \right ) -\cot \left ( bx+a \right ) \right ) }{4\,b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(2*b*x+2*a)^2*sin(b*x+a),x)

[Out]

1/4/b/cos(b*x+a)+1/4/b*ln(csc(b*x+a)-cot(b*x+a))

________________________________________________________________________________________

Maxima [B]  time = 1.22817, size = 319, normalized size = 11.39 \begin{align*} \frac{4 \, \cos \left (2 \, b x + 2 \, a\right ) \cos \left (b x + a\right ) -{\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \log \left (\cos \left (b x\right )^{2} + 2 \, \cos \left (b x\right ) \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (b x\right )^{2} - 2 \, \sin \left (b x\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}\right ) +{\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \log \left (\cos \left (b x\right )^{2} - 2 \, \cos \left (b x\right ) \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (b x\right )^{2} + 2 \, \sin \left (b x\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}\right ) + 4 \, \sin \left (2 \, b x + 2 \, a\right ) \sin \left (b x + a\right ) + 4 \, \cos \left (b x + a\right )}{8 \,{\left (b \cos \left (2 \, b x + 2 \, a\right )^{2} + b \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, b \cos \left (2 \, b x + 2 \, a\right ) + b\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(2*b*x+2*a)^2*sin(b*x+a),x, algorithm="maxima")

[Out]

1/8*(4*cos(2*b*x + 2*a)*cos(b*x + a) - (cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1)*log(
cos(b*x)^2 + 2*cos(b*x)*cos(a) + cos(a)^2 + sin(b*x)^2 - 2*sin(b*x)*sin(a) + sin(a)^2) + (cos(2*b*x + 2*a)^2 +
 sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1)*log(cos(b*x)^2 - 2*cos(b*x)*cos(a) + cos(a)^2 + sin(b*x)^2 + 2*s
in(b*x)*sin(a) + sin(a)^2) + 4*sin(2*b*x + 2*a)*sin(b*x + a) + 4*cos(b*x + a))/(b*cos(2*b*x + 2*a)^2 + b*sin(2
*b*x + 2*a)^2 + 2*b*cos(2*b*x + 2*a) + b)

________________________________________________________________________________________

Fricas [B]  time = 0.494509, size = 154, normalized size = 5.5 \begin{align*} -\frac{\cos \left (b x + a\right ) \log \left (\frac{1}{2} \, \cos \left (b x + a\right ) + \frac{1}{2}\right ) - \cos \left (b x + a\right ) \log \left (-\frac{1}{2} \, \cos \left (b x + a\right ) + \frac{1}{2}\right ) - 2}{8 \, b \cos \left (b x + a\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(2*b*x+2*a)^2*sin(b*x+a),x, algorithm="fricas")

[Out]

-1/8*(cos(b*x + a)*log(1/2*cos(b*x + a) + 1/2) - cos(b*x + a)*log(-1/2*cos(b*x + a) + 1/2) - 2)/(b*cos(b*x + a
))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(2*b*x+2*a)**2*sin(b*x+a),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.64272, size = 556, normalized size = 19.86 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(2*b*x+2*a)^2*sin(b*x+a),x, algorithm="giac")

[Out]

-1/4*(2*(6*tan(1/2*b*x + 2*a)*tan(1/2*a)^11 - tan(1/2*a)^12 - 2*tan(1/2*b*x + 2*a)*tan(1/2*a)^9 + 12*tan(1/2*a
)^10 - 36*tan(1/2*b*x + 2*a)*tan(1/2*a)^7 + 27*tan(1/2*a)^8 - 36*tan(1/2*b*x + 2*a)*tan(1/2*a)^5 - 2*tan(1/2*b
*x + 2*a)*tan(1/2*a)^3 - 27*tan(1/2*a)^4 + 6*tan(1/2*b*x + 2*a)*tan(1/2*a) - 12*tan(1/2*a)^2 + 1)/((tan(1/2*b*
x + 2*a)^2*tan(1/2*a)^6 - 15*tan(1/2*b*x + 2*a)^2*tan(1/2*a)^4 + 12*tan(1/2*b*x + 2*a)*tan(1/2*a)^5 - tan(1/2*
a)^6 + 15*tan(1/2*b*x + 2*a)^2*tan(1/2*a)^2 - 40*tan(1/2*b*x + 2*a)*tan(1/2*a)^3 + 15*tan(1/2*a)^4 - tan(1/2*b
*x + 2*a)^2 + 12*tan(1/2*b*x + 2*a)*tan(1/2*a) - 15*tan(1/2*a)^2 + 1)*(tan(1/2*a)^6 - 15*tan(1/2*a)^4 + 15*tan
(1/2*a)^2 - 1)) + log(abs(tan(1/2*b*x + 2*a)*tan(1/2*a)^3 - 3*tan(1/2*b*x + 2*a)*tan(1/2*a) + 3*tan(1/2*a)^2 -
 1)) - log(abs(3*tan(1/2*b*x + 2*a)*tan(1/2*a)^2 - tan(1/2*a)^3 - tan(1/2*b*x + 2*a) + 3*tan(1/2*a))))/b